import request from '@/util/request.js'

// 获取联想建议的接口
export const getSuggestion = (val) => {
  return request({
    method: 'GET',
    url: 'http://ttapi.research.itcast.cn/app/v1_0/suggestion',
    params: {
      q: val
    }
  })
}

// 获取搜索结果
export const getSearch = (params) => {
  return request({
    method: 'GET',
    url: '/app/v1_0/search',
    params
  })
}
